<?php


/*
* Copyright (c) 2008-2016 vip.com, All Rights Reserved.
*
* Powered by com.vip.osp.osp-idlc-2.5.11.
*
*/

namespace com\vip\cup\supply\vop\structs\aftersale;

class ReturnApplyStatusInfoData {
	
	static $_TSPEC;
	public $extApplyId = null;
	public $extOrderSn = null;
	public $returnStatus = null;
	public $extraData = null;
	public $updateTime = null;
	public $scenarioCode = null;
	
	public function __construct($vals=null){
		
		if (!isset(self::$_TSPEC)){
			
			self::$_TSPEC = array(
			1 => array(
			'var' => 'extApplyId'
			),
			2 => array(
			'var' => 'extOrderSn'
			),
			4 => array(
			'var' => 'returnStatus'
			),
			5 => array(
			'var' => 'extraData'
			),
			6 => array(
			'var' => 'updateTime'
			),
			7 => array(
			'var' => 'scenarioCode'
			),
			
			);
			
		}
		
		if (is_array($vals)){
			
			
			if (isset($vals['extApplyId'])){
				
				$this->extApplyId = $vals['extApplyId'];
			}
			
			
			if (isset($vals['extOrderSn'])){
				
				$this->extOrderSn = $vals['extOrderSn'];
			}
			
			
			if (isset($vals['returnStatus'])){
				
				$this->returnStatus = $vals['returnStatus'];
			}
			
			
			if (isset($vals['extraData'])){
				
				$this->extraData = $vals['extraData'];
			}
			
			
			if (isset($vals['updateTime'])){
				
				$this->updateTime = $vals['updateTime'];
			}
			
			
			if (isset($vals['scenarioCode'])){
				
				$this->scenarioCode = $vals['scenarioCode'];
			}
			
			
		}
		
	}
	
	
	public function getName(){
		
		return 'ReturnApplyStatusInfoData';
	}
	
	public function read($input){
		
		$input->readStructBegin();
		while(true){
			
			$schemeField = $input->readFieldBegin();
			if ($schemeField == null) break;
			$needSkip = true;
			
			
			if ("extApplyId" == $schemeField){
				
				$needSkip = false;
				$input->readString($this->extApplyId);
				
			}
			
			
			
			
			if ("extOrderSn" == $schemeField){
				
				$needSkip = false;
				$input->readString($this->extOrderSn);
				
			}
			
			
			
			
			if ("returnStatus" == $schemeField){
				
				$needSkip = false;
				$input->readI32($this->returnStatus); 
				
			}
			
			
			
			
			if ("extraData" == $schemeField){
				
				$needSkip = false;
				$input->readString($this->extraData);
				
			}
			
			
			
			
			if ("updateTime" == $schemeField){
				
				$needSkip = false;
				$input->readString($this->updateTime);
				
			}
			
			
			
			
			if ("scenarioCode" == $schemeField){
				
				$needSkip = false;
				$input->readString($this->scenarioCode);
				
			}
			
			
			
			if($needSkip){
				
				\Osp\Protocol\ProtocolUtil::skip($input);
			}
			
			$input->readFieldEnd();
		}
		
		$input->readStructEnd();
		
		
		
	}
	
	public function write($output){
		
		$xfer = 0;
		$xfer += $output->writeStructBegin();
		
		if($this->extApplyId !== null) {
			
			$xfer += $output->writeFieldBegin('extApplyId');
			$xfer += $output->writeString($this->extApplyId);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		if($this->extOrderSn !== null) {
			
			$xfer += $output->writeFieldBegin('extOrderSn');
			$xfer += $output->writeString($this->extOrderSn);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		if($this->returnStatus !== null) {
			
			$xfer += $output->writeFieldBegin('returnStatus');
			$xfer += $output->writeI32($this->returnStatus);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		if($this->extraData !== null) {
			
			$xfer += $output->writeFieldBegin('extraData');
			$xfer += $output->writeString($this->extraData);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		if($this->updateTime !== null) {
			
			$xfer += $output->writeFieldBegin('updateTime');
			$xfer += $output->writeString($this->updateTime);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		if($this->scenarioCode !== null) {
			
			$xfer += $output->writeFieldBegin('scenarioCode');
			$xfer += $output->writeString($this->scenarioCode);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		$xfer += $output->writeFieldStop();
		$xfer += $output->writeStructEnd();
		return $xfer;
	}
	
}

?>